PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Window Manager >

Programming With the Mac OS 8.5 Window Manager


TrackWindowProxyDrag

Handles all aspects of the drag process when the user drags a proxy icon.

pascal OSStatus TrackWindowProxyDrag (
                     WindowPtr window,
                     Point startPt);
window
A value of type WindowPtr . Pass a pointer to the window whose proxy icon is being dragged.
startPt
A structure of type Point . Before calling TrackWindowProxyDrag , your application should set the Point structure to contain the point, specified in global coordinates, where the mouse-down event that began the drag occurred. Your application may retrieve this value from the where field of the event structure.
function result
A result code. See Result Codes. If you receive the error errUserWantsToDragWindow (-5607), your application should respond by calling the Window Manager function DragWindow . Errors are also returned from the Drag Manager, including userCanceledErr (-128).
DISCUSSION

If your application uses proxy icons to represent a type of object (currently, file system entities such as files, folders, and volumes) supported by the Window Manager, your application should call the TrackWindowProxyDrag function, and the Window Manager can handle all aspects of the drag process for you. If your application calls the TrackWindowProxyDrag function, it does not have to call the Drag Manager function WaitMouseMoved before starting to track the drag, as the Window Manager handles this automatically. However, if a proxy icon represents a type of data that the Window Manager does not support, or if you wish to implement custom dragging behavior, your application should call the function TrackWindowProxyFromExistingDrag .

Your application detects that a user is dragging one of its proxy icons when the function FindWindow returns the inProxyIcon result code; see FindWindow Result Code Constant for the Proxy Icon for more details.

See Supporting Window Proxy Icons for examples of how your application can provide proxy icon support in its document windows.

VERSION NOTES

Available with Mac OS 8.5 and later.


© 1999 Apple Computer, Inc. – (Last Updated 18 March 99)